<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>学习React</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            background-color: transparent;
        }
    </style>
</head>

<body>
    <script src="./node_modules/pixi.js/dist/pixi.js"></script>
    <script>
        var app = new PIXI.Application(800, 600, {backgroundColor : 0x1099bb});
        document.body.appendChild(app.view);
        var bunny = PIXI.Sprite.fromImage('img/bunny.png')
        bunny.anchor.set(0.5);
        bunny.x = app.screen.width / 2;
        bunny.y = app.screen.height / 2;
        app.stage.addChild(bunny);
        app.ticker.add(function(delta) {
            bunny.rotation += 0.1 * delta;
        });
        </script>
</body>

</html>